$OpenBSD: patch-lib_ps2epsi,v 1.7 2012/08/22 06:24:17 ajacoutot Exp $
--- lib/ps2epsi.orig	Wed Aug  8 10:01:36 2012
+++ lib/ps2epsi	Fri Aug 17 15:12:56 2012
@@ -10,20 +10,7 @@ fi
 GS_EXECUTABLE="$gs"
 
 # try to create a temporary file securely
-if test -z "$TMPDIR"; then
-	TMPDIR=/tmp
-fi
-if which mktemp >/dev/null 2>/dev/null; then
-	tmpfile="`mktemp $TMPDIR/ps2epsi.XXXXXX`"
-else
-	tmpdir=$TMPDIR/ps2epsi.$$
-	(umask 077 && mkdir "$tmpdir")
-	if test ! -d "$tmpdir"; then
-		echo "failed: could not create temporary file"
-		exit 1
-	fi
-	tmpfile="$tmpdir"/ps2epsi$$
-fi
+tmpfile=`mktemp -t ps2epsiXXXXXXXXXX` || exit 1
 trap "rm -rf \"$tmpfile\"" 0 1 2 3 7 13 15
 
 export outfile
